package com.wzy.ucenter.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzy.ucenter.model.po.XcMenu;
import com.wzy.ucenter.model.po.XcUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * <p>
 *  Mapper 接口
 * </p>
 */
public interface XcUserMapper extends BaseMapper<XcUser> {
    @Select("select * from xcplus_users.xc_menu where id in (select menu_id from  xcplus_users.xc_permission where role_id in (select role_id from xcplus_users.xc_user_role where user_id = #{userId}))")
    List<XcMenu> selectUserPermissionByUserId(@Param("userId") String userId);
}
